package com.sheep.wenda.action;

import com.sheep.opt.AbstractAction;
import com.sheep.wenda.dao.WendaDao;
import com.sheep.wenda.dao.WendaDao2;


/**
 * Created by IntelliJ IDEA.
 * User: wnj
 * Date: 2010-11-15
 * Time: 11:23:13
 * To change this template use File | Settings | File Templates.
 */
public class DemoAction extends AbstractAction {

    public String fake() throws Exception {
        WendaDao dao1 = new WendaDao();
        WendaDao2 dao = new WendaDao2();
        int a = dao.selectAll();
        int b = dao.selectAll2();
        int c = dao1.queryInt();
        int d = dao1.queryInt2();
        
        request.setAttribute("a", a);
        request.setAttribute("b", b);
        request.setAttribute("c", c);
        request.setAttribute("d", d);
        return SUCCESS;
    }

    public String test() throws Exception {
        addMsg("这里是消息");
        addErr("这里是错误");
        addInfo("这里是内容");
        return SUCCESS;
    }
}
